import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Childs from '../views/Childs.vue'
import Login from '../views/Login.vue'
// import Layout from '../views/Layout.vue'

Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/login' },
  // {
  //   path: '/',
  //   component: Layout,
  //   children: [
  {
    path: '/Home',
    name: 'Home',
    component: Home
  },
  {
    path: '/Childs',
    name: 'Childs',
    component: Childs
    //   }
    // ]
  },
  {
    path: '/Login',
    name: 'Login',
    meta: { withoutLayout: true },
    component: Login
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
